import base from '@/api/baseurl';
import request from '@/utils/request'

/**
 * 查询期限
 * @param {*} query
 * @returns
 */
export function findCustomterm(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/customterm/findCustomterm',
    method: 'get',
    params: query
  })
}

/**
 * 单行删除
 * @param {*} query
 * @returns
 */
export function deleteCustomterm(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/customterm/deleteCustomterm',
    method: 'get',
    params: query
  })
}

/**
 * 增加期限
 * @param {*} data
 * @returns
 */
export function addCustomterm(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/customterm/addCustomterm',
    method: 'post',
    data
  })
}

/**
 * 获取期限点编号
 * @param {*} data
 * @returns
 */
export function getAddtermRateCode(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/customterm/addterm_rate_code',
    method: 'post',
    data
  })
}

/**
 * 修改期限
 * @param {*} data
 * @returns
 */
export function updateCustomterm(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/customterm/updateCustomterm',
    method: 'post',
    data
  })
}
